
<%@ page import="com.techedge.insidetrack.Insidetrack" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'insidetrack.label', default: 'Insidetrack')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#show-insidetrack" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-insidetrack" class="content scaffold-show" role="main">
			<h1><g:message code="default.show.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list insidetrack">
			
				<g:if test="${insidetrackInstance?.code}">
				<li class="fieldcontain">
					<span id="code-label" class="property-label"><g:message code="insidetrack.code.label" default="Code" /></span>
					
						<span class="property-value" aria-labelledby="code-label"><g:fieldValue bean="${insidetrackInstance}" field="code"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${insidetrackInstance?.schedule}">
				<li class="fieldcontain">
					<span id="schedule-label" class="property-label"><g:message code="insidetrack.schedule.label" default="Schedule" /></span>
					
						<span class="property-value" aria-labelledby="schedule-label"><g:formatDate format="dd/MM/yyyy hh:mm" date="${insidetrackInstance?.schedule}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${insidetrackInstance?.information}">
				<li class="fieldcontain">
					<span id="information-label" class="property-label"><g:message code="insidetrack.information.label" default="Information" /></span>
					
						<span class="property-value" aria-labelledby="information-label"><g:fieldValue bean="${insidetrackInstance}" field="information"/></span>
					
				</li>
				</g:if>
					
				<g:if test="${insidetrackInstance?.twitterTag}">
				<li class="fieldcontain">
					<span id="twitterTag-label" class="property-label"><g:message code="insidetrack.twitterTag.label" default="Twitter Tag" /></span>
					
						<span class="property-value" aria-labelledby="twitterTag-label"><g:fieldValue bean="${insidetrackInstance}" field="twitterTag"/></span>
					
				</li>
				</g:if>

				<g:if test="${insidetrackInstance?.language}">
				<li class="fieldcontain">
					<span id="language-label" class="property-label"><g:message code="insidetrack.language.label" default="Language" /></span>
					
						<span class="property-value" aria-labelledby="language-label"><g:fieldValue bean="${insidetrackInstance}" field="language"/></span>
					
				</li>
				</g:if>

				<g:if test="${insidetrackInstance?.locations}">
				<li class="fieldcontain">
					<span id="locations-label" class="property-label"><g:message code="insidetrack.locations.label" default="Locations" /></span>
					
						<g:each in="${insidetrackInstance.locations}" var="l">
						<span class="property-value" aria-labelledby="locations-label"><g:link controller="location" action="show" id="${l.id}">${l?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>

				<g:if test="${insidetrackInstance?.creator}">
				<li class="fieldcontain">
					<span id="creator-label" class="property-label"><g:message code="insidetrack.creator.label" default="Creator" /></span>
					
						<span class="property-value" aria-labelledby="creator-label"><g:link controller="user" action="show" id="${insidetrackInstance?.creator?.id}">${insidetrackInstance?.creator?.encodeAsHTML()}</g:link></span>
					
				</li>
				</g:if>
			
				
				<li class="fieldcontain">
					<g:set var="entityName" value="${message(code: 'attendee.label', default: 'Attendee')}" />
					<g:link class="create" controller="attendee" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link>
				</li>

				<li class="fieldcontain">
					<g:set var="entityName" value="${message(code: 'tracksession.label', default: 'Track Session')}" />
					<g:link class="create" controller="tracksession" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link>
				</li>
				
			</ol>
			
			
			
			
			
			<div id="list-insidetrack-attendees" class="content scaffold-list" role="main">
				<g:set var="entityName" value="${message(code: 'attendee.label', default: 'Attendee')}" />
				<h1><g:message code="default.list.label" args="[entityName]" /></h1>
				<table>
					<thead>
						<tr>
							<th>#</th>
						
							<g:sortableColumn property="name" title="${message(code: 'user.name.label', default: 'Name')}" />
							
							<g:sortableColumn property="twitterId" title="${message(code: 'user.twitterId.label', default: 'Twitter Id')}" />
							
							<g:sortableColumn property="location" title="${message(code: 'attendee.location.label', default: 'Location')}" />
							
							<g:sortableColumn property="note" title="${message(code: 'attendee.note.label', default: 'Note')}" />
							
						</tr>
					</thead>
					<tbody>
					<g:each in="${insidetrackInstance.attendees}" status="i" var="attendeeInstance">
						<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
						
							<td>${(i+1 <= 9 ) ? '0'+(i+1) : (i+1) }</td>
						
							<td><g:link controller="user" action="show" id="${attendeeInstance?.user?.id}">${attendeeInstance?.user?.name}</g:link></td>
							
							<td>${fieldValue(bean: attendeeInstance?.user?.twitterId, field: "twitterId")}</td>
						
							<td>${fieldValue(bean: attendeeInstance, field: "location")}</td>
							
							<td>${fieldValue(bean: attendeeInstance, field: "note")}</td>
						
						</tr>
					</g:each>
					</tbody>
				</table>
	
			</div>
		
		<br>
		<br>
		
			<div id="list-insidetrack-sessions" class="content scaffold-list" role="main">
				<g:set var="entityName" value="${message(code: 'tracksession.label', default: 'Track Sessions')}" />
				<h1><g:message code="default.list.label" args="[entityName]" /></h1>
				<table>
					<thead>
						<tr>
																
							<g:sortableColumn property="starTime" title="${message(code: 'tracksession.starTime.label', default: 'Time Slot')}" />
	
							<g:sortableColumn property="description" title="${message(code: 'tracksession.description.label', default: 'Description')}" />
							
							<g:sortableColumn property="tags" title="${message(code: 'tracksession.tags.label', default: 'Tags')}" />
							
							<g:sortableColumn property="hosts" title="${message(code: 'tracksession.hosts.label', default: 'Hosts')}" />
							
						</tr>
					</thead>
					<tbody>
					<g:each in="${insidetrackInstance.sessions.sort{it.id}}" status="i" var="tracksessionInstance">
						<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
						
							<td>
								<g:link controller="tracksession" action="show" id="${tracksessionInstance.id}"> <g:formatDate date="${tracksessionInstance.starTime}" format="hh:mm" /> - <g:formatDate date="${tracksessionInstance.endTime}" format="hh:mm" />
								</g:link>
							</td>
											
							<td>${fieldValue(bean: tracksessionInstance, field: "description")}</td>
							
							<td>${fieldValue(bean: tracksessionInstance, field: "tags")}</td>
							
							<td>
								<g:each in="${tracksessionInstance.hosts}" status="j" var="userInstance">
								${userInstance?.name} <br>
								</g:each>
							</td>
						</tr>
					</g:each>
					</tbody>
				</table>
			
			</div>
			
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${insidetrackInstance?.id}" />
					<g:link class="edit" action="edit" id="${insidetrackInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>